<?php
    session_start();    

    if(!file_exists('usernamesAndPasswords.txt'))    
    {
        file_put_contents('usernamesAndPasswords.txt', 'user|qwerty'.PHP_EOL, FILE_APPEND);
    }
    
    include ('normalizeData.php');
    include ('validateData.php');

    if($wrongData)
    {
        $_SESSION['message'] = 'Wrong username or password!';
        unset($_SESSION['username']);
    }   

    header('Location: index.php');
?>
